package com.bnc.menu.schedule;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;

import com.bnc.dto.PlanDTO;
import com.bnc.manager.JDBCManager;

public class deleteAction {

	private JDBCManager jdbcManager;
	private PreparedStatement pstmt;
	
	public deleteAction(int no){
		
		jdbcManager = JDBCManager.getInstance();
		
		String query = "delete from tbl_plan where plan_no = "+no;
		
		pstmt = jdbcManager.prepareStatement( query );
		
		try {
			pstmt.executeUpdate();
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			try {
				if(pstmt != null)
				pstmt.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}		
		
		}
	}
}
